package qin.entity;

import qin.annotation.Length;
import qin.annotation.NoEmpty;
import qin.annotation.Range;

/**
 * 书的实体类
 * @author 小行星
 *
 */
public class Book {
	/**
	 * 书号：ISBN-XXX
	 */
	@NoEmpty("书号")
	@Length(min = 1, max = 64)
	private String number;
	
	@NoEmpty("书名")
	@Length(min = 1, max = 60)
	private String name;
	
	@Range(8)
	private Double price;
	
	@Length(min = 1, max = 65)
	private String author;
	
	/**
	 * 出版方
	 */
	@Length(min = 1, max = 99)
	private String press;
	
	
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getPress() {
		return press;
	}
	public void setPress(String press) {
		this.press = press;
	}
	
	@Override
	public String toString() {
		return "Book [number=" + number + ", name=" + name + ", price=" + price + ", author=" + author + ", press="
				+ press + "]";
	}
}
